﻿using INTEX.DataBase.Tools;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.Data.OracleClient;
using ReflectionStudio.Components.UserControls;
using System.ComponentModel;
namespace WPFExcelReport
{
    public partial class TMAPDEF
    {

        public TMAPDEF()
        {
            MV = new VMAPDEF();
            DataContext = MV;
            InitializeComponent();
        }
        public override void QueryCommand(object sender, RoutedEventArgs e)
        {
            dwData = TBMain.NewRow();
            dwData = TBMain.NewRow();
            dwData["MDMANDANT"] = app.Mandant;
            dwData["MDNAME"] = ART.PadRight(8);
            SResult = TMV.QMAPDEF01(dwData);
            foreach (DataRow row in SResult.Tables[0].Rows)
            { 
                byte[] content = (byte[])row["MDALLTAB1"];
                continue;
                string value = Helpers.Helper.byteToHexStr(content);
                row["ALLTAB1"] = Helpers.Helper.byte2str(content);
                content = (byte[])row["MDALLTAB2"];
                row["ALLTAB2"] = Helpers.Helper.byte2str(content);
                content = (byte[])row["MDALLTAB3"];
                row["ALLTAB3"] = Helpers.Helper.byte2str(content);
                content = (byte[])row["MDALLTAB4"];
                row["ALLTAB4"] = Helpers.Helper.byte2str(content);
                content = (byte[])row["MDALLTAB5"];
                row["ALLTAB5"] = Helpers.Helper.byte2str(content); 
                content = (byte[])row["MDALLTAB6"];
                row["ALLTAB6"] = Helpers.Helper.byte2str(content);
                content = (byte[])row["MDALLTAB7"];
                row["ALLTAB7"] = Helpers.Helper.byte2str(content);
                content = (byte[])row["MDZUSTAB1"];
                row["ZUSTAB1"] = Helpers.Helper.byte2str(content);
                content = (byte[])row["MDZUSTAB2"];
                row["ZUSTAB2"] = Helpers.Helper.byte2str(content); 
            }
            MergeData(SResult, true);
            base.QueryCommand(sender, e);
        }
    }
}

